<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('修改试用期变动人员')"/>
    <th:block th:include="include :: layout-latest-css"/>
    <th:block th:include="include :: ztree-css"/>
    <th:block th:include="include :: select2-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-trial-edit" AUTOCOMPLETE="OFF">
        <input name="id" id="id" type="hidden" th:value="${editTrialEmp.id}"/>
        <div class="form-group">
            <label class="col-sm-3 control-label ">工号：</label>
            <div class="col-sm-8">
                <input class="form-control" id="badge" type="text" th:value="${editTrialEmp.badge}"
                       readonly="readonly"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">姓名：</label>
            <div class="col-sm-8">
                <input class="form-control" id="name" type="text" th:value="${editTrialEmp.name}"
                       readonly="readonly"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">公司名称：</label>
            <div class="col-sm-8">
                <input class="form-control" id="compName" type="text" th:value="${editTrialEmp.compName}"
                       readonly="readonly"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">部门名称：</label>
            <div class="col-sm-8">
                <input class="form-control" id="depName" type="text" th:value="${editTrialEmp.depName}"
                       readonly="readonly"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">岗位名称：</label>
            <div class="col-sm-8">
                <input class="form-control" id="jobName" type="text" th:value="${editTrialEmp.jobName}"
                       readonly="readonly"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">入职时间：</label>
            <div class="col-sm-8">
                <input class="form-control" id="JoinDate" type="text" th:value="${editTrialEmp.joindate}"
                       readonly="readonly"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">试用开始日期：</label>
            <div class="col-sm-8">
                <input class="form-control" id="ProbBeginDate" type="text" th:value="${editTrialEmp.ProbBeginDate}"
                       readonly="readonly"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">试用期(月)：</label>
            <div class="col-sm-8">
                <input class="form-control" id="Probterm" type="text" th:value="${editTrialEmp.Probterm}"
                       readonly="readonly"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">试用结束日期：</label>
            <div class="col-sm-8">
                <input class="form-control" id="Probenddate" type="text" th:value="${editTrialEmp.Probenddate}"
                       readonly="readonly"/>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label "><span style="color: red; ">*</span>新试用开始日期：</label>
            <div class="col-sm-8">
                <input class="form-control laydate-demo-1" id="NewProbBeginDate" name="NewProbBeginDate" type="text" th:value="${editTrialEmp.NewProbBeginDate}"
               required />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label "><span style="color: red; ">*</span>新试用期(月)：</label>
            <div class="col-sm-8">
                <input class="form-control" id="NewProbterm" name="NewProbterm" type="text" th:value="${editTrialEmp.NewProbterm}"
               required />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label "><span style="color: red; ">*</span>试用结束日期：</label>
            <div class="col-sm-8">
                <input class="form-control laydate-demo-2" id="NewProbEnddate" name="NewProbEnddate" type="text" th:value="${editTrialEmp.NewProbEnddate}"
                  required    />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label "><span style="color: red; ">*</span>生效日期：</label>
            <div class="col-sm-8">
                <input class="form-control laydate-demo-3" id="Effectdate" name="Effectdate" type="text" th:value="${editTrialEmp.Effectdate}"
                   required    />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">备注：</label>
            <div class="col-sm-8">
                <input class="form-control" id="remark" name="remark" type="text" th:value="${editTrialEmp.remark}"
                    required   />
            </div>
        </div>
    </form>
</div>


<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: datetimepicker-js"/>

<script th:inline="javascript">

    var prefix = ctx + "changeManage/TrialChange";


    $(function () {
        layui.use('laydate', function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '.laydate-demo-1',
                type: 'date'
            });
        });

        layui.use('laydate', function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '.laydate-demo-2',
                type: 'date'
            });
        });

        layui.use('laydate', function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '.laydate-demo-3',
                type: 'date'
            });
        });
    });


    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#form-trial-edit").serializeArray();
            var id = $("#id").val();
            var NewProbBeginDate = $("#NewProbBeginDate").val();
            var NewProbterm = $("#NewProbterm").val();
            var NewProbEnddate = $("#NewProbEnddate").val();
            var Effectdate = $("#Effectdate").val();
            var remark = $("#remark").val();

            data.push({"name": "id", "value": id});
            data.push({"name": "NewProbBeginDate", "value": NewProbBeginDate});
            data.push({"name": "NewProbterm", "value": NewProbterm});
            data.push({"name": "NewProbEnddate", "value": NewProbEnddate});
            data.push({"name": "Effectdate", "value": Effectdate});
            data.push({"name": "remark", "value": remark});

            $.operate.save(prefix + "/edit", data);
        }
    }

</script>


</body>
</html>